
import Person from './person.js';
class Teacher extends Person {
    constructor(id,name,age,klass){
        super(id,name,age);
        this.klass=klass;
    }
    introduce(){
        let result=super.introduce();
        if(this.klass===undefined)
            result+=` I am a Teacher. I teach No Class.`;
        else
            result+=` I am a Teacher. I teach Class ${this.klass.number}.`;
        return result;
    }
}
export default Teacher;

